pragma Singleton
import QtQuick 2.0
import QtQuick.Window 2.11


QtObject {
    id:root

    //屏幕是否窄屏？
    readonly property real primaryOrientation:Screen.primaryOrientation

    //屏幕的方向？
    //property alias orientation:Screen.orientation

    readonly property real ppi:Screen.pixelDensity*25.4
    readonly property real lpi:Screen.logicalPixelDensity*25.4
    readonly property real dpi:(ppi/lpi)

    function px2dp(px){
        return px * dpi;
    }

    function px2dp2(px) {
        return px * dpi;
    }
	
}
